#include <boost/array.hpp>
#include <iostream>
#include <string>
#include <algorithm>

int main()
{
	typedef boost::array<std::string,3> array;
	array a;
	a[0] = "Liang";    //*subscript operator
	a.at(1) = "Zhang"; //*at() method
	*a.rbegin() = "Huajuan";
	for (array::const_iterator it = a.begin(); it != a.end(); ++it) 
		std::cout << *it << std::endl;
	std::sort(a.begin(),a.end() ); //sort
	for (array::const_iterator it = a.begin(); it != a.end(); ++it) 
		std::cout << *it << std::endl;

	std::cout << a.size() << std::endl;     //*size()
	std::cout << a.max_size() << std::endl; //*max_size()

	array b = {"Liang","Zhang","Huajuan"};
	for (array::const_iterator it = b.begin(); it != b.end(); ++it) 
		std::cout << *it << std::endl;

}